﻿<Page x:Class="UIT.Web.Sample.MyFirstPage" xmlns="http://dragon-angel.fr/uit" Title="Ma page à moi" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib"
      xmlns:local="clr-namespace:UIT.Sample;assembly=UIT.Sl.Sample">
    <StackPanel Orientation="Vertical">
        <TextBox Id="tb_my" />
        <Button Id="btn_my" IsDefault="True" Text="Test" Background="Red" />
        <Repeater Id="rpt1">
            <Repeater.DataSource>
                <EnumerableDataProvider>
                    <local:CustomObject Prop1="1-1" Prop2="1-2">
                        <local:CustomObject.Child>
                            <local:CustomObject Prop1="1-1-1" Prop2="1-1-2">
                                <local:CustomObject.Child>
                                    <local:CustomObject Prop1="1-1-1-1" Prop2="1-1-1-2">
                                        <local:CustomObject.Child>
                                            <local:CustomObject Prop1="1-1-1-1-1" Prop2="1-1-1-1-2">

                                            </local:CustomObject>
                                        </local:CustomObject.Child>
                                    </local:CustomObject>
                                </local:CustomObject.Child>

                            </local:CustomObject>
                        </local:CustomObject.Child>
                    </local:CustomObject>
                    <local:CustomObject Prop1="2-1" Prop2="2-2" />
                    <local:CustomObject Prop1="3-1"  Prop2="3-2" />
                </EnumerableDataProvider>
            </Repeater.DataSource>
            <Repeater.ItemTemplate>
                <DataTemplate>
                    <TemplateContent>
                        <StackPanel Orientation="Horizontal">
                            <Button Text="{Binding Path=Child.Child.Prop1,StringFormat=Select \{0\}}" Command="Select" />
                            <Button Text="{Binding Prop2,StringFormat=Delete \{0\}}" AclResource="{Binding Prop2, StringFormat=/Feature/\{0\}}" />
                        </StackPanel>
                    </TemplateContent>
                </DataTemplate>
            </Repeater.ItemTemplate>
        </Repeater>
        <DataGrid>
            <DataGrid.DataSource>
                <EnumerableDataProvider>
                    <sys:String>a</sys:String>
                    <sys:String>b</sys:String>
                    <sys:String>c</sys:String>
                </EnumerableDataProvider>
            </DataGrid.DataSource>
            <DataGrid.DataGridColumns>
                <Column>
                    <Column.ItemTemplate>
                        <DataTemplate>
                            <TemplateContent>
                                <TextBox Text="{Binding }" />
                            </TemplateContent>
                        </DataTemplate>
                    </Column.ItemTemplate>
                </Column>
                <Column>
                    <Column.ItemTemplate>
                        <DataTemplate>
                            <TemplateContent>
                                <Button Text="{Binding }" />
                            </TemplateContent>
                        </DataTemplate>
                    </Column.ItemTemplate>
                </Column>
            </DataGrid.DataGridColumns>
        </DataGrid>
    </StackPanel>
</Page>